<?php
/**
Include this file
**/
 
 set_include_path(get_include_path() . PATH_SEPARATOR . './inc/lib' . PATH_SEPARATOR . './inc/app');
 require_once('Zend/Registry.php');
 require_once('Zend/Loader/Autoloader.php');
 
 
 $config = parse_ini_file('./inc/config/config.ini', true); 

 $loader = Zend_Loader_Autoloader::getInstance();
 
 $loader->registerNamespace('Signalsy'); //для основных классов
 $loader->registerNamespace('Admin'); //для админ-панели
 $loader->registerNamespace('Test'); //для тестирования
 $loader->registerNamespace('App'); // для приложения
 $loader->registerNamespace('Framework'); // для приложения

 //инициализируем FirePHP Log,
 if ($config['Logging']['use_firebug_logging'] == true)
 {
 
	$ajax_log = new Zend_Log();
	$ajax_log->addWriter(new Zend_Log_Writer_Firebug());			
			
	$request = new Zend_Controller_Request_Http();
	$response = new Zend_Controller_Response_Http();
	$channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
	$channel->setRequest($request);
	$channel->setResponse($response);
			
	Zend_Registry::getInstance()->set('firephp_channel', $channel);
	Zend_Registry::getInstance()->set('firephp_response', $response);
				
	$ajax_log->log('FirePHP logging are start!', Zend_Log::INFO);	
	
	$_time = microtime(true);
	Zend_Registry::getInstance()->set('start_time', $_time); 
		
	Zend_Registry::getInstance()->set('ajax_log', $ajax_log); 		
 
 }
 
 
 
 if ($config['Performance']['use_ob_handler'] == true)
 {
	//Лог через firephp доступен только если есть буферизация вывода
			
	if ($config['Performance']['use_web_optimizer_system'] == true)
	{
		//weboptimizer start
		require('./inc/lib/WebOptimizer/web.optimizer.php');
	}
	else
		{			
			if ($config['Performance']['use_ob_gzip_compress'] == '1')
			{
				ob_start('ob_gzhandler');
			}
			else
				{
					ob_start();
				}
		}
 }
 
 
 
 
 
 
 
 
 
 